<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ page import="com.fckbug.util.WebappUtil"%>
<%@ page import="com.fckbug.util.SpringContextHolder"%>
<%@ page import="com.fckbug.service.UserService"%>
<%com.fckbug.vos.Acc acc = WebappUtil.getLoginUser(request);
UserService userService = (UserService)SpringContextHolder.getBean("userService");
if(acc!=null){
acc = userService.getUserByUserId(acc.getId());
}
String uri = request.getRequestURI();
//String url = request.getRequestURL().toString();
//System.out.println(uri);
//System.out.println(url);
%>
<div id="header">
	<div id="searchWrap">
        <div id="hsearch">
			<form id="search" action="/search" method="get" autocomplete="off">
				<div>
					<input autocomplete="off" name="q" class="textbox" placeholder="search" tabindex="1" type="text" maxlength="240" size="28" value="" style="width: 220px; max-width: 220px;">
				</div>
			</form>
		</div>
    </div>
	<div id="topbar">
		<div id="hlinks">
			<span id="hlinks-user"><%if(acc==null) {%><a href="/login.jsp">登录</a><%}else{ %><a href="/user/profile.do?id=<%=acc.getId() %>" class="profile-link"><%=acc.getNickName() %></a><%} %>&nbsp;<a href="/users/2553154/hao?tab=reputation"><!-- <span class="reputation-score" title="your reputation; view reputation changes" dir="ltr">1</span> --></a>
			</span>
		</div>
	</div>
	<br class="cbt">
	<!-- <div id="hlogo">
		<a href="/">
			Stack Overflow
		</a>
	</div> -->
	<div id="hmenus">
		<div class="nav mainnavs ">
			<ul>
				<li<%if(uri.indexOf("/question/")>-1){ out.print(" class='youarehere'");}%>><a id="nav-questions" href="/question/list.do">问题</a></li>
				<!-- <li><a id="nav-tags" href="/tags">Tags</a></li> -->
				<li<%if(uri.indexOf("/users/")>-1||uri.indexOf("/user/")>-1){ out.print(" class='youarehere'");}%>><a id="nav-users" href="/users/">用户</a></li>
				<li<%if(uri.indexOf("/unanswered/")>-1){ out.print(" class='youarehere'");}%>><a id="nav-unanswered" href="/unanswered.do">未解决</a></li>
			</ul>
		</div>
		<div class="nav askquestion">
			<ul>
				<li<%if(uri.indexOf("ask")>-1){ out.print(" class='youarehere'");}%>>
					<a id="nav-askquestion" href="/ask/ask.jsp">提问</a>
				</li>
			</ul>
		</div>
	</div>
</div>